package com.shop.front.vo.user;

import com.alibaba.fastjson.annotation.JSONField;
import com.shop.jpa.domain.BaseDomain;
import com.shop.util.StrMaskUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Transient;
import java.io.Serializable;
import java.util.Date;

@ApiModel("UserExtractVo 提现信息")
@Data
public class UserPromotersVo extends BaseDomain implements Serializable {

    @ApiModelProperty(value = "id", hidden = true)
	@Id
    @Column(name = "id")
	@JSONField(serialize=false)
    private Long id;


    /**
     * 用户账号
     */
    @ApiModelProperty("用户账号")
    @Column(name = "account")
    private String account;


    /**
     * 用户头像
     */
    @ApiModelProperty("用户头像")
    @Column(name = "avatar")
    private String avatar;

    /**
	 * 创建时间
	 */
    @ApiModelProperty("创建时间")
	@Column(name = "create_time")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;



    @ApiModelProperty("用户账号(脱敏)")
    @Transient
    private String accountStr;
    public String getAccountStr() {
        return StrMaskUtil.maskMobile(this.account);
    }
}